<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use app\models\Type;

/* @var $this yii\web\View */
/* @var $model app\models\Product */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="product-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'type_id')->dropDownList(Type::dropdown('type'),['prompt'=>'分类']) ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'spec')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'hot')->textInput() ?>

    <?= $form->field($model, 'market_val')->textInput() ?>

    <?= $form->field($model, 'cost')->textInput() ?>

    <?= $form->field($model, 'return_rate')->textInput() ?>

    <?= $form->field($model, 'start_price')->textInput() ?>

    <?= $form->field($model, 'scope')->textInput() ?>

    <?= $form->field($model, 'fee')->textInput() ?>

    <?= $form->field($model, 'degree')->textInput() ?>

    <?= $form->field($model, 'lowest_price')->textInput() ?>

    <?= $form->field($model, 'highest_price')->textInput() ?>

    <?= $form->field($model, 'actcount')->textInput() ?>

    <?= $form->field($model, 'reacount')->textInput() ?>

    <?= $form->field($model, 'can_robot')->dropDownList($model->dropdown('can_robot')) ?>

    <?= $form->field($model, 'have_cost')->dropDownList($model->dropdown('have_cost')) ?>

    <?= $form->field($model, 'ios')->dropDownList($model->dropdown('ios')) ?>

    <?= $form->field($model, 'can_give')->dropDownList($model->dropdown('can_give')) ?>

    <?= $form->field($model, 'kind')->dropDownList($model->dropdown('kind')) ?>

    <?= $form->field($model, 'can_show')->dropDownList($model->dropdown('can_show')) ?>

    <?= $form->field($model, 'state')->dropDownList($model->dropdown('state')) ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
